‹#›
Inventor API 中的零件图、部件图和工程图
3D 草图范例
Public Sub Draw3DSketch()
Dim oPartDoc As PartDocument
oPartDoc = _InvApplication.ActiveDocument
Dim oPartDef As PartComponentDefinition
oPartDef = oPartDoc.ComponentDefinition
Dim oSketch3D As Sketch3D
oSketch3D = oPartDef.Sketches3D.Add
Dim oTG As TransientGeometry
oTG = _InvApplication.TransientGeometry
Dim oLastLine As SketchLine3D
oLastLine = oSketch3D.SketchLines3D.AddByTwoPoints( _
oPartDef.WorkPoints.Item(1), _
oTG.CreatePoint(5, 0, 0))
oLastLine = oSketch3D.SketchLines3D.AddByTwoPoints( _
oLastLine.EndSketchPoint, _
oTG.CreatePoint(5, 5, 0), _
True, 2)
oLastLine = oSketch3D.SketchLines3D.AddByTwoPoints( _
oLastLine.EndSketchPoint, _
oTG.CreatePoint(5, 5, 3))
End Sub